package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.DailyNews;
import cn.wolfcode.trip.base.query.DailyNewsQuery;
import org.apache.ibatis.annotations.Param;

import cn.wolfcode.trip.base.query.QueryObject;
import java.util.List;

public interface DailyNewsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(DailyNews news);

    DailyNews selectByPrimaryKey(Long id);

    List<DailyNews> selectAll();

    int updateByPrimaryKey(DailyNews news);

    List<DailyNews> selectForList(DailyNewsQuery qo);

    List<DailyNews> selectForApp(DailyNewsQuery qo); //查询index页面上的日报数据

    List<DailyNews> selectForDailyNews(QueryObject qo);
    DailyNews selectById(Long news_id);             //根据id查询文章的详细内容

    List<DailyNews> selectByCatalog(@Param("qo")DailyNewsQuery qo , @Param("id")Long id); //根据catalog来查询5篇文章
}